﻿package net.wangit.jdbc.table;

import net.wangit.framework.cache.Cache;
import net.wangit.framework.util.CacheUtil;

public class TableCache {

	public TableCache() {
	}

	public static TableMeta get(String domain, String tableName) {
		return (TableMeta) getCache(domain).get(tableName);
	}

	public static void put(String domain, String tableName, TableMeta tableMeta) {
		getCache(domain).put(tableName, tableMeta);
	}

	public static void clear(String domain, String tableName) {
		getCache(domain).clear(tableName);
	}

	public static void clearAll(String domain) {
		getCache(domain).clearAll();
	}

	private static Cache getCache(String domain) {
		return CacheUtil.getTableCache(domain);
	}
}
